<?php
// +----------------------------------------------------------------------
// | 会员卡消费日志查询，针对收不到信息的景区重打印
// +----------------------------------------------------------------------
// | TongBaoChun <501468940@qq.com>
// +----------------------------------------------------------------------
// | 2015/10/28
// +----------------------------------------------------------------------

$card    = $_REQUEST['card'];
$termial = $_REQUEST['termial'];
$token   = $_REQUEST['token'];
if(md5($termial.$card.'PFT12301')!=$token) exit('{"code":"1011","msg":"认证失败"}');

$cache_file = '/var/www/html/new/d/api/logs/terminal/terminal_sale_output_'.date('Ym').'.txt';
$cache_data = file_exists($cache_file) ? json_decode(file_get_contents($cache_file), true):array();
echo $cache_data[$card.'_'.$termial];
